import * as VueRouter from "vue-router";

const routes = [
  {
    path: '/',
    component: defineAsyncComponent(() => import("@com/Index.vue")),
  },
  {
    path: '/feedback',
    component: defineAsyncComponent(() => import("@com/FeedBack.vue")),
  },
  {
    path: '/about',
    component: defineAsyncComponent(() => import("@com/About.vue")),
  },
  {
    path: '/mine',
    component: defineAsyncComponent(() => import("@com/Mine.vue")),
  },
];

export default VueRouter.createRouter({
  // 4. 内部提供了 history 模式的实现。为了简单起见，我们在这里使用 hash 模式。
  history: VueRouter.createWebHistory(),
  routes, // `routes: routes` 的缩写
});
